<template>
    <el-tabs type="border-card" class="edittabform">
        <el-tab-pane label="内容">
            <div class="formtopcard">
                <el-radio v-model="obj.iframeType" :label="1">看板</el-radio>
                <el-radio v-model="obj.iframeType" :label="2">网址</el-radio>
                <div class="sltcontent">
                    <div v-if="obj.iframeType == 2">
                        <el-input type="textarea" v-model="obj.webUrl" :autosize="{ minRows: 4 }"></el-input>
                    </div>
                    <div v-if="obj.iframeType == 1" class="editcontent">
                        <select v-model="obj.iframeBoardId">
                            <option :value="item.id" v-for="item in boardListArr" :key="item.id">
                                {{ item.name }}
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </el-tab-pane>
        <el-tab-pane label="布局">
            <box-form :predefineColors="predefineColors" :obj="obj" :setColorChange="setColorChange"></box-form>
        </el-tab-pane>
    </el-tabs>
</template>

<script>
export default {
    name: "EmbedForm",
    props: {
        predefineColors: Array,
        obj: Object,
        setColorChange: Function,
        boardListArr: Array,
    },
    model: {
        prop: "obj",
        event: "change",
    },
    components: {
        BoxForm: () => import('../mixin/BoxForm.vue'),
    },
    methods: {

    }
}
</script>